package main

import "fmt"

func main() {
	//回文判断，上海自来水来自海上  ，顺着读倒着读一样
	// a1[0]  == a1[len(a1)-1]
	// a1[1]  == a1[len(a1)-1-1]

	//a1 := "上海自来水来自海上"  //偶数个
	//a1 := "奶牛产牛奶" //基数个
	a1 := "山西运煤车煤运西山" //基数个

	c1 := make([]rune, 0)
	for _, v := range a1 {
		c1 = append(c1, v)
	}
	fmt.Println(c1)
	for n, _ := range c1{
		if c1[n] != c1[len(c1)-1-n]{
			fmt.Println("不是回文")
			return
		}
	}
	fmt.Println("是回文")
}
